import { createSlice } from "@reduxjs/toolkit"

let initialState={
  isLogin : false,
  userInfo : {},
}

export type UserSliceState = typeof initialState

const userSlice = createSlice({
    name : "user",
    initialState ,
    reducers : {
        initUserInfo : (state:UserSliceState, {payload})=>{
            state.userInfo = payload;
        }
    }
});

// const { initUserInfo } = userSlice.actions;
export default userSlice.reducer;
